home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Lightspeed C SKEL fldr / Skel redraw.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-06-17  |  1.6 KB  |  56 lines  |  [TEXT/KAHL]

  1. #include <WindowMgr.h>        
  2. #include <MenuMgr.h>
  3. #include <EventMgr.h>
  4. #include "Skel defines.h"
  5. #include "Skel globals.h"
  6.  
  7. /*#include <MemoryMgr.h>        
  8. #include <ToolboxUtil.h>
  9. #include <EventMgr.h>
  10. #include <TextEdit.h>
  11. #include <Stdio.h>
  12. #include <OSUtil.h>
  13. #include <ToolboxUtil.h>
  14. #include <DialogMgr.h>*/
  15.  
  16. /* 
  17. Redraw my window
  18. ############################   DrawWindow   #############################
  19.  
  20.    We draw all the contents of our one window, myWindow.  Note that this
  21.    must include scroll bar areas and the grow icon; the Window Manager
  22.    will NOT Handle those for us. Since there are no scroll bars, we
  23.    must erase the Region they would be in.  Echh.
  24. */
  25.  
  26. drawwindow () {
  27.     Rect arect;            /* rectangle to erase */
  28.  
  29.     FillRect (&mywindow -> portRect, &dkGray);
  30.                 /*  first, fill the window with dark gray;
  31.                    this fills scroll bars, too */
  32.  
  33. /*  second, erase the scroll bars and draw the grow icon */
  34.  
  35. /*  erase the horizontal scroll bar */
  36.     SetRect (&arect,        /* cover the horizontal bar */
  37.         mywindow -> portRect.left,
  38.         mywindow -> portRect.bottom - 15,
  39.         mywindow -> portRect.right - 15,
  40.         mywindow -> portRect.bottom);
  41.     FillRect (&arect, &white);    /* fill with white */
  42.  
  43. /*  erase the vertical scroll bar */
  44.     SetRect (&arect,        /* cover the vertical bar */
  45.         mywindow -> portRect.right - 15,
  46.         mywindow -> portRect.top,
  47.         mywindow -> portRect.right,
  48.         mywindow -> portRect.bottom - 15);
  49.     FillRect (&arect, &white);    /* fill with white */
  50.  
  51.     DrawGrowIcon (mywindow);    /* draw the size box in the corner of the
  52.                    window */
  53.  
  54. }                /* DrawWindow */
  55.  
  56.